package UnitTest.AlgorithmTest.combineTest.lisTest;

import Algorithm.comprehensive.lis.LIS;
import TestData.AlgorithmTestData.combineTestTada.lisTestData.LISTestDemoData;

/**
 * @author liujun
 * @version 1.0
 * @date 2020/6/7
 * @author—Email liujunfirst@outlook.com
 * @blogURL https://blog.csdn.net/ljfirst
 * @description 最长递增子序列 测试案例
 */
public class LISTestDemo extends LISTestDemoData {

    public void TestDemo(LIS LISImpl) {
        int result = LISImpl.longestIncreasingSubsequence(demo01);
        assert result == 9;
        result = LISImpl.longestIncreasingSubsequence(demo02);
        assert result == 0;
        result = LISImpl.longestIncreasingSubsequence(demo03);
        assert result == 0;
        result = LISImpl.longestIncreasingSubsequence(demo04);
        assert result == 5;
        result = LISImpl.longestIncreasingSubsequence(demo05);
        assert result == 9;
        result = LISImpl.longestIncreasingSubsequence(demo06);
        assert result == 5;
        result = LISImpl.longestIncreasingSubsequence(demo07);
        assert result == 4;
        result = LISImpl.longestIncreasingSubsequence(demo08);
        assert result == 1;
        result = LISImpl.longestIncreasingSubsequence(demo09);
        assert result == 1;
        result = LISImpl.longestIncreasingSubsequence(demo10);
        assert result == 9;
    }
}
